//调用接口配置文件
import { request } from 'config/request'

// 获取省市区
export async function queryAllAddress(params) {
    return request({
        url: 'admin/address/queryAllAddress',
        method: 'GET',
        data: params,
    });
};

// 获取市对应的楼盘
export async function getCityEstateList(params) {
    return request({
        url: 'admin/estate/adminList',
        method: 'POST',
        data: params,
    });
};

//根据productID获取楼盘项目的信息
export async function getProductInto(params) {
    return request({
        url: `admin/estate/detail?productId=${params.productId}`,
        method: 'GET',
    });
}


// 获取基础设置详情
export async function getBaseDetail(params) {
    return request({
        url: `mideadc-game-center-service/activity/gameActivity/detail?gameActivityId=${params.gameActivityId}`,
        method: 'GET',
        // data: params,
    });
};

//楼盘列表
export async function houseListGet(params) {

    return request({
        url: 'admin/estate/adminList',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};

//   //新增基础设置
// export async function addBase(params) {
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivity/add',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: params,
//     });
// };
// //   //编辑基础设置
//   export async function editBase(params) {
//     console.log(JSON.stringify(params))
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivity/edit',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: params,
//     });
// };


// 获取派奖方式详情
export async function getPrizeWayDetail(params) {
    return request({
        url: `mideadc-game-center-service/activity/gameActivityAwardMode/detail?gameActivityId=${params.gameActivityId}`,
        method: 'GET',
        // data: params,
    });
};

// // 新增派奖方式
// export async function addPrizeWay(params) {
//     console.log(params);
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivityAwardMode/edit',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: params,
//     });
// };
// // 编辑派奖方式
//   export async function editPrizeWay(params) {
//     console.log(params);
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivityAwardMode/edit',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: params,
//     });
// };


//获取奖项设置详情
export async function getPrizeSetDetail(params) {
    return request({
        url: `mideadc-game-center-service/activity/gameActivityAward/detail?gameActivityId=${params.gameActivityId}`,
        method: 'GET',
        // data: params,
    });
};

// //新增奖项设置
// export async function addPrizeSet(params) {
//     let ls = [];
//     ls.push(params);
//     console.log(JSON.stringify(ls)); 
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivityAward/edit',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: ls,
//     });
// };
// //编辑奖项设置
// export async function editPrizeSet(params) {
//     let ls = [];
//     ls.push(params);
//     console.log(JSON.stringify(ls)); 
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivityAward/edit',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: ls,
//     });
// };



// 获取高级设置详情
export async function getHighSetDetail(params) {
    return request({
        url: `mideadc-game-center-service/activity/gameActivity/advancedSettingDetail?gameActivityId=${params.gameActivityId}`,
        method: 'GET',
        // data: params,
    });
};

// //新增高级设置
// export async function addHighSet(params) {
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivity/advancedSetting',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: params,
//     });
// };
// //编辑高级设置
// export async function editHighSet(params) {
//     return request({
//         url: 'mideadc-game-center-service/activity/gameActivity/advancedSetting',
//         method: 'POST',
//         headers:{
//             "content-type":'application/json'
//         },
//         data: params,
//     });
// };

//获取不可选取城市

export async function getDiscity(params) {
    return request({
        url: `admin/slideshow/getCityStatus/${params}`,
        method: 'GET',
        headers: {
            "content-type": 'application/json'
        }
    });
};

//新增活动详情数据
export async function addParams(params) {
    console.log(params);
    return request({
        url: 'mideadc-game-center-service/activity/gameActivity/add',
        method: 'POST',
        headers: {
            "content-type": 'application/json'
        },
        data: params,
    });
};
// 编辑活动详情数据
export async function editParams(params) {
    console.log(params);
    return request({
        url: 'mideadc-game-center-service/activity/gameActivity/edit',
        method: 'POST',
        headers: {
            "content-type": 'application/json'
        },
        data: params,
    });
};
// 游戏抽奖次数配置列表
export async function luckDrawNumConfig(params) {
    return request({
        url: `mideadc-game-center-service/activity/gameActivityLuckDrawNumConfig/list?gameActivityId=${params.gameActivityId}`,
        method: 'GET'
    });
}
//城市与区域级联
export async function regionArea(params) {
    console.log(params)
    return request({
        url: `admin/common/region/area/tree/get `,
        method: 'GET',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};